package main

import (
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
	userApi "hais.pw/admin/apis"
)

func initRouter() *echo.Echo {
	e := echo.New()

	e.Use(middleware.Logger())
	e.Use(middleware.Recover())

	//用户处理
	e.POST("/user", userApi.AddApi)
	e.DELETE("/user/:id", userApi.DeleteApi)
	e.GET("/user/:id", userApi.GetApi)
	e.GET("/user", userApi.AllApi)
	e.PUT("/user/:id", userApi.UpdateApi)

	return e
}
